package com.mavenq.fly.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class InitialData {

    @EventListener
    public void eventListener(PushEvent<String> event) {
        log.info(this.getClass().getSimpleName() + "监听到数据：" + event.getData());
        String data = event.getData();
        System.out.println("data:" + data);
        System.out.println("event:"+ event.getSource());
    }

}
